package com.imooc.controller;


import com.imooc.utils.RedisOperator;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.PropertySource;
import org.springframework.web.bind.annotation.RestController;

@RestController
@PropertySource(value = {"classpath:resource.properties"}, encoding = "utf-8")
public class BaseController {
     @Autowired
    public RedisOperator redisOperator;

     public static final String USER_REDIS_SESSION="user_redis_session";

     public void setRedisForUser(String key ,String value){
         redisOperator.set(key, value,  60*30); //单位是s

     }

}
